home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Item MB Quick & Easy 2.0
/
Item MB Quick & Easy 2.0.iso
/
mbfacad
/
eaitstk2.lsp
< prev
next >
Wrap
Lisp/Scheme
|
1998-03-15
|
21KB
|
593 lines
(EAITmsg "mb_mld3" "\n" "002" "\n")
(princ)
;*****Stⁿckliste Hauptmenⁿ
(defun EAITSTMEN (/ AIT-D AIT-X AIT-L)
(EAITmsg "mb_mld3" "\n\n" "024" "\n")
(EAITvari)
(EAITvars)
(setq AIT-D (open (strcat EAITpfm "dwg.$$$") "w"))
(if AIT-D (progn
(setq AIT-X (strcase (cdr (SplitFn (getvar "dwgname")))))
(prin1 AIT-X AIT-D)
(close AIT-D)
(if (NOT (AND (findfile (strcat EAITpfn "ml/mb-stckl.imd")) (= EAITml3 1)))
(command "EAITshell" (strcat EAITKAT " " EAITpfm))
(command "EAITshell" EAITSTCKL)
);if
(EAITst-info)
);progn
)
(EAITvarz)
(load (strcat (strcat EAITpfn "EAIT" EAITds EAITpm)))
(menucmd "p1=*")
(princ)
)
;**** Einlesen und sortieren
(defun EAITSTEIN ( / AIT-D AIT-X AIT-Y AIT-Z AIT-L what_next stichwort thema)
(EAITmsg "mb_mld3" "\n\n" "025" "\n")
(EAITvari)
(EAITvars)
;AIT-D=dwg.$$$
(setq AIT-D (open (strcat EAITpfm "dwg.$$$") "w"))
(if AIT-D (progn
(setq AIT-X (strcase (cdr (splitfn (getvar "dwgname"))))
AIT-Y ","
AIT-Z "IM"
)
;Dateiname:
(prin1 AIT-X AIT-D)
(princ AIT-Y AIT-D)
(prin1 AIT-Z AIT-D)
(princ AIT-Y AIT-D)
;letzte Positionsnummer:
(prin1 EAITpos AIT-D)
;Datei schliessen:
(close AIT-D)
(setq what_next 1)
(if (= EAITposs 1) ;Positionen schon vergeben in Merker/Schalter gesetzt
(progn
;****Warnung bei schon vergebenen Pos.zahlen
(if (< (setq dcl_id (load_dialog (strcat EAITpfd "EAITem"))) 0)
(exit)
)
(new_dialog "pos_warnung" dcl_id)
(set_tile "Titel" (EAITmg "mb_mld15" "016"));Achtung
(set_tile "Meldung17" (EAITmg "mb_mld15" "017"));schon angezogene Positionen verΣndern sich !
(setq thema (EAITmg "mb_mld21" "012");Hilfe fuer einen item-Befehl
stichwort ":item1"
)
(action_tile "help" "(hilfe stichwort thema)")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq what_next (start_dialog)) ; Throw up the dialogue.
(unload_dialog dcl_id)
);progn
);if
;Programm geht bei ok weiter:
(if (= what_next 1)
(progn
;Nummern einfuegen:
(if (AND (findfile (strcat EAITpfn "ml/mb-stckl.imd"))(= EAITml3 1)) ;in Merker/Schalter gesetzt
(progn
;Nummernvergabe ok:
(if (= EAITposs 0)
(progn
(if (tblsearch "BLOCK" "AIT$MERK") ;Merker-Bloecke vorhanden
(progn
; attext SDF Schablonendatei Ausgabedatei
(command EAITatt EAITats (strcat EAITpfn "mb_stpa") (strcat EAITpfm "AIT$2D"))
(EAITreadwrite (strcat EAITpfm "AIT$2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpa") (strcat EAITpfm "AIT$3D"))
(EAITreadwrite (strcat EAITpfm "AIT$3D"))
;extrahieren Bauteildaten + alte Positionsnummer aus Block mit der Nummer
)
);if
(command EAITatt EAITats (strcat EAITpfn "mb_stpos") (strcat EAITpfm AIT-X))
(EAITreadwrite (strcat EAITpfm AIT-X))
(if (NOT (findfile (strcat EAITpfm AIT-X)))
(command EAITatt EAITats (strcat EAITpfn "mb_stpos") (strcat EAITpfm AIT-X))
)
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpos") (strcat EAITpfm "3d"))
(EAITreadwrite (strcat EAITpfm "3d"))
;extrahieren Bauteildaten + alte Positionsnummer aus Block mit der Nummer
(if (tblsearch "BLOCK" "AIT$MERK") ;wenn Block AIT$MERK vorhanden
(EAITwattstckl)
)
;Aufruf der ML3 Stⁿckliste
(command "EAITshell" EAITSTCKL)
);progn
(progn ;Nummernvergabe nicht ok
(if (tblsearch "BLOCK" "AIT$MERK")
(progn
(command EAITatt EAITats (strcat EAITpfn "mb_stpax") (strcat EAITpfm "AIT$2D"))
(if (NOT (findfile (strcat EAITpfm "AIT$2D")))
(command EAITatt EAITats (strcat EAITpfn "mb_stpax") (strcat EAITpfm "AIT$2D"))
)
(EAITreadwrite (strcat EAITpfm "AIT$2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpax") (strcat EAITpfm "AIT$3D"))
(EAITreadwrite (strcat EAITpfm "AIT$3D"))
)
)
(command EAITatt EAITats (strcat EAITpfn "mb_stpox") (strcat EAITpfm AIT-X))
(EAITreadwrite (strcat EAITpfm AIT-X))
(if (NOT (findfile (strcat EAITpfm AIT-X)))
(command EAITatt EAITats (strcat EAITpfn "mb_stpox") (strcat EAITpfm AIT-X))
)
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpox") (strcat EAITpfm "3d"))
(EAITreadwrite (strcat EAITpfm "3d"))
(if (tblsearch "BLOCK" "AIT$MERK")
(EAITwattstckl)
)
;Aufruf der ML3 Stⁿckliste
(command "EAITshell" EAITSTCKL)
);progn
);if ;Ende 18.10.
(EAITref)
(EAITst-info)
);progn
(progn
(if (= EAITposs 0)
(progn
(if (tblsearch "BLOCK" "AIT$MERK")
(progn
(command EAITatt EAITats (strcat EAITpfn "mb_stpa") (strcat EAITpfm "AIT$2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpa") (strcat EAITpfm "AIT$3D"))
)
)
(command EAITatt EAITats (strcat EAITpfn "mb_stpos") (strcat EAITpfm "EAIT2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpos") (strcat EAITpfm "EAIT3D"))
(if (tblsearch "BLOCK" "AIT$MERK")
(EAITwattsort)
)
(command "EAITshell" (strcat EAITSORT " " AIT-X " " (rtos EAITpos 2 0) " " EAITpfm " " EAITpfd))
;Befehl"ISORT.EXE";Parameter: Zeichnungsname, erste Pos., Temp-Pfad,Datenpfad
)
(progn
(if (tblsearch "BLOCK" "AIT$MERK")
(progn
(command EAITatt EAITats (strcat EAITpfn "mb_stpax") (strcat EAITpfm "AIT$2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpax") (strcat EAITpfm "AIT$3D"))
)
)
(command EAITatt EAITats (strcat EAITpfn "mb_stpox") (strcat EAITpfm "EAIT2D"))
(command EAITatt EAITats (strcat EAITpfn "3d/3d_stpox") (strcat EAITpfm "EAIT3D"))
(if (tblsearch "BLOCK" "AIT$MERK")
(EAITwattsort)
)
(command "EAITshell" (strcat EAITSORT " " AIT-X " " (rtos EAITpos 2 0) " " EAITpfm " " EAITpfd))
;Befehl"ISORT.EXE";Parameter: Zeichnungsname, erste Pos., Temp-Pfad,Datenpfad
)
);if
(EAITref)
)
);if
);progn
);if (= what_next 1)
)
)
(EAITvarz)
(menucmd "p1=*")
(princ)
)
;******in Grafik ⁿbertragen
(defun EAITSTINZ (/ AIT-D AIT-X AIT-Y AIT-Z AIT-L)
(EAITvari)
(EAITvars)
(setq AIT-D (open (strcat EAITpfm "dwg.$$$") "w"))
(if AIT-D (progn
(setq AIT-X (strcase (cdr (splitfn (getvar "dwgname"))))
AIT-Y ","
AIT-Z "EX")
(prin1 AIT-X AIT-D)
(princ AIT-Y AIT-D)
(prin1 AIT-Z AIT-D)
(close AIT-D)
(if (AND (findfile (strcat EAITpfn "ml/mb-stckl.imd"))(= EAITml3 1))
(progn
; Aufruf der ML3 Stⁿckliste
(command "EAITshell" EAITSTCKL)
; (command "EAITstckl")
(EAITST-INFO)
)
(progn
(if (findfile (strcat EAITpfm "EAITexp.txt"))(EAITGRAFIK (strcat EAITpfm "EAITexp.txt")) )
)
)
)
)
(EAITvarz)
(menucmd "p1=*")
(princ)
)
***wird nur für ML3-Stückliste benötigt, zur Übergabe der Daten
(defun EAITST-INFO (/ AIT-D AIT-INFO AIT-L AIT-MBFUN AIT-MBDAT)
(redraw)
(setq AIT-D (open (strcat EAITpfm "dwg.$$$") "r"))
(if AIT-D (progn
(setq AIT-INFO (read-line AIT-D)
AIT-L (strlen AIT-INFO))
(while (/= AIT-L 0)
(if (= (substr AIT-INFO AIT-L 1) ",")
(progn
(setq AIT-INFO (substr AIT-INFO 1 (1- AIT-l))
AIT-MBFUN (substr AIT-INFO (- AIT-L 3) 2)
AIT-L 0
)
(if (= AIT-MBFUN "GR")
(progn
(setq AIT-MBDAT (substr AIT-INFO 2 (- (strlen AIT-INFO) 7)))
(EAITGRAFIK AIT-MBDAT)
);progn
);if
);progn
(setq AIT-L (1- AIT-L))
);if
);while
(close AIT-D)
(command "EAITshell" (strcat "del" EAITpfm "DWG.$$$"))
)
)
)
(defun EAITGRAFIK (AIT-ST-Name / AIT-ST-Datei AIT-ST-Zeile AIT-ST-Pos AIT-ST-Nr AIT-ST-Bez1 AIT-ST-Bez2
AIT-ST-Bez3 AIT-ST-Bez4 AIT-ST-Bez5 AIT-ST-Bez6 AIT-ST-Lae AIT-ST-Br AIT-ST-Anz
AIT-ST-Nr1 AIT-ST-Nr2 AIT-ST-Nr3 AIT-ST-Nr4 AIT-ST-Nr5 AIT-ST-Nr6 AIT-ST-Nr7
AIT-ST-VT AIT-P-ST)
(EAITmsg "mb_mld3" "\n\n" "027" "\n")
(EAITmsg "mb_mld3" "\n" "028" nil)
(setvar "OSMODE" 1)
(setq AIT-P-ST (getpoint))
(setvar "OSMODE" 0)
(if (/= AIT-P-ST nil)
(progn
(command EAITege (strcat EAITpfm "EAITplti") AIT-P-ST EAITms "" "")
(setq AIT-ST-Datei (open AIT-ST-Name "r"))
(if AIT-ST-Datei
(progn
(setq AIT-ST-Zeile (read-line AIT-ST-Datei))
(while AIT-ST-Zeile
(setq AIT-ST-Pos (atoi (substr AIT-ST-Zeile 1 4))
AIT-ST-Anz (atoi (substr AIT-ST-Zeile 5 4))
AIT-ST-Bez1 (substr AIT-ST-Zeile 9 30)
AIT-ST-Bez2 (substr AIT-ST-Zeile 39 30)
AIT-ST-Bez3 (substr AIT-ST-Zeile 69 30)
AIT-ST-Bez4 (substr AIT-ST-Zeile 99 30)
AIT-ST-Bez5 (substr AIT-ST-Zeile 129 30)
AIT-ST-Bez6 (substr AIT-ST-Zeile 159 30)
AIT-ST-Lae (atof (substr AIT-ST-Zeile 189 6))
AIT-ST-Br (atof (substr AIT-ST-Zeile 195 6))
)
(if (OR (= (setq AIT-ST-Nr1 (substr AIT-ST-Zeile 201 1)) NULL)(= AIT-ST-Nr1 " "))(setq AIT-ST-Nr1 "0"))
(if (OR (= (setq AIT-ST-Nr2 (substr AIT-ST-Zeile 202 1)) NULL)(= AIT-ST-Nr2 " "))(setq AIT-ST-Nr2 "0"))
(if (OR (= (setq AIT-ST-Nr3 (substr AIT-ST-Zeile 203 1)) NULL)(= AIT-ST-Nr3 " "))(setq AIT-ST-Nr3 "0"))
(setq AIT-ST-Nr3 (strcat AIT-ST-Nr3 (substr AIT-ST-Zeile 204 2))
AIT-ST-Nr4 (substr AIT-ST-Zeile 206 2)
AIT-ST-Nr5 (substr AIT-ST-Zeile 208 1)
AIT-ST-Nr6 (substr AIT-ST-Zeile 209 3)
AIT-ST-Nr7 (substr AIT-ST-Zeile 212 1)
AIT-ST-VT (substr AIT-ST-Zeile 213 1)
;alt komplette item-Nummer AIT-ST-Nr (strcat AIT-ST-Nr1 "." AIT-ST-Nr2 "." AIT-ST-Nr3 "." AIT-ST-Nr4 " ." AIT-ST-Nr5 "." AIT-ST-Nr6 "." AIT-ST-Nr7 " " AIT-ST-VT)
AIT-ST-Nr (strcat AIT-ST-Nr1 "." AIT-ST-Nr2 "." AIT-ST-Nr3 "." AIT-ST-Nr4)
AIT-P-ST (list (car AIT-P-ST)(+ (cadr AIT-P-ST)(* 4 EAITms)))
)
(if (/= AIT-ST-Lae 0.0)
(if (/= AIT-ST-Br 0.0)
(progn
(setvar "luprec" 0)
(setq AIT-ST-Bez2 (strcat (EAITmg "mb_mld3" "029")(rtos AIT-ST-Lae 2 0)(EAITmg "mb_mld3" "030")(rtos AIT-ST-Br 2 0)))
)
(progn
(setvar "luprec" 1)
(setq AIT-ST-Bez2 (strcat (EAITmg "mb_mld3" "029") (rtos AIT-ST-Lae 2 1)))
)
)
)
(if (< AIT-ST-Bez1 "0")(setq AIT-ST-Bez1 AIT-ST-Bez2 AIT-ST-Bez2 " "))
(if (< AIT-ST-Bez3 "0")(setq AIT-ST-Bez3 AIT-ST-Bez4 AIT-ST-Bez4 " "))
(if (< AIT-ST-Bez5 "0")(setq AIT-ST-Bez5 AIT-ST-Bez6 AIT-ST-Bez6 " "))
(if (< AIT-ST-Bez3 "0")
(setq AIT-ST-Bez3 AIT-ST-Nr)
(setq AIT-ST-Bez4 AIT-ST-Nr)
)
(command EAITege (strcat EAITpfn "EAITplli") AIT-P-ST EAITms "" "" "" "" AIT-ST-Bez2 AIT-ST-Bez4 AIT-ST-Bez6)
(setq AIT-P-ST (list (car AIT-P-ST)(+ (cadr AIT-P-ST)(* 4 EAITms))))
(command EAITege (strcat EAITpfn "EAITplli") AIT-P-ST EAITms "" "" AIT-ST-Pos AIT-ST-Anz AIT-ST-Bez1 AIT-ST-Bez3 AIT-ST-Bez5)
(setq AIT-ST-Zeile (read-line AIT-ST-Datei))
)
(close AIT-ST-Datei)
)
(princ)
)
)
)
)
(defun EAITREF (/ AIT-D AIT-Z1 AIT-E AIT-Pos AIT-Idx AIT-Posx AIT-Posy)
(if (AND (findfile (strcat EAITpfn "ml/mb-stckl.imd"))(= EAITml3 1))
(setq AIT-D (open (strcat EAITpfm "3D.TXT") "r") )
(setq AIT-D (open (strcat EAITpfm "EAITREF.TXT") "r") )
)
(if AIT-D
(progn
(setq AIT-Z1 (read-line AIT-D))
(while AIT-Z1
(setq AIT-Pos (atoi (substr AIT-Z1 1 4))
AIT-Idx (atoi (substr AIT-Z1 5 1))
AIT-E (entget(entnext(handent (substr AIT-Z1 6 16))))
AIT-Posy (cdr (assoc 1 (entget(entnext(handent (substr AIT-Z1 6 16))))))
AIT-Posx (EAITposx AIT-Posy AIT-Pos AIT-Idx)
)
(setq AIT-E (subst (cons 1 AIT-Posx)(assoc 1 AIT-E) AIT-E) )
(entmod AIT-E)
(if (= EAITposs 0)
(if (> AIT-Pos EAITpos)(setq EAITpos AIT-Pos))
(setq EAITpos AIT-Pos)
)
(setq AIT-Z1 (read-line AIT-D) )
)
(close AIT-D)
(EAITmkr "S" nil)
(command EAITreg)
)
(princ)
)
(princ)
)
;Schreiben einer Datei AIT-X.txt bestehend aus AIT-X.txt + ait$2d.txt
;und schreiben einer Datei 3d.txt bestehend aus 3d.txt + ait$3d.txt
;für MB-STCKL.IMD
(defun EAITwattstckl ( / zeile 2d ait$2d 3d ait$3d )
; 2D
(if (AND (findfile (strcat EAITpfm AIT-X ".TXT")) (findfile (strcat EAITpfm "AIT$2D.TXT")))
(progn
(setq 2d (open (strcat EAITpfm AIT-X ".TXT") "a"))
(setq ait$2d (open (strcat EAITpfm "AIT$2D.TXT") "r"))
(while (setq zeile (read-line ait$2d))
(write-line zeile 2d)
);while
(close ait$2d)
(close 2d)
)
)
; 3D
(if (AND (findfile (strcat EAITpfm "3D.TXT")) (findfile (strcat EAITpfm "AIT$3D.TXT")))
(progn
(setq 3d (open (strcat EAITpfm "3D.TXT") "a"))
(setq ait$3d (open (strcat EAITpfm "AIT$3D.TXT") "r"))
(while (setq zeile (read-line ait$3d))
(write-line zeile 3d)
);while
(close ait$3d)
(close 3d)
)
)
);defun EAITwattstckl
;Schreiben einer Datei eait2d.txt bestehend aus eait2d.txt + ait$2d.txt
;und schreiben einer Datei eait3d.txt bestehend aus eait3d.txt + ait$3d.txt
;fⁿr ISORT.EXE
(defun EAITwattsort ( / zeile eait3d ait$3d )
; 2D
(if (AND (findfile (strcat EAITpfm "EAIT2D.TXT"))(findfile (strcat EAITpfm "AIT$2D.TXT")))
(progn
(setq eait2d (open (strcat EAITpfm "EAIT2D.TXT") "a"))
(setq ait$2d (open (strcat EAITpfm "AIT$2D.TXT") "r"))
(while (setq zeile (read-line ait$2d))
(write-line zeile eait2d)
);while
(close ait$2d)
(close eait2d)
)
)
; 3D
(if (AND (findfile (strcat EAITpfm "EAIT3D.TXT"))(findfile (strcat EAITpfm "AIT$3D.TXT")))
(progn
(setq eait3d (open (strcat EAITpfm "EAIT3D.TXT") "a"))
(setq ait$3d (open (strcat EAITpfm "AIT$3D.TXT") "r"))
(while (setq zeile (read-line ait$3d))
(write-line zeile eait3d)
);while
(close ait$3d)
(close eait3d)
)
)
);defun EAITwattsort
;-----------------------------------------------------------------------------
;Funktion zur Aktualisierung der Positionsnummern von 3D-Bloecken
(defun c:EAIT3Dpositionrefresh ( / asatzdaten z1 z2 elepos refdata refwert ref ele3d
ele3dpos posele3d eleposnr3d nrele3d
attpos attposneu atteledata atteledataneu
)
;Erfassung aller 3D-Positionsnummern:
(setq asatzdaten (ssget "X" '((0 . "INSERT") (-3 ("INFO_REFERENZ")))))
(if (/= asatzdaten nil)
(progn
(setq z2 (sslength asatzdaten)
z1 0
)
(repeat z2
(setq elepos (ssname asatzdaten z1)
z1 (+ z1 1)
refdata (entget elepos '("INFO_REFERENZ"))
refwert (cdr (assoc -3 refdata))
ref (cdr (assoc 1005 (cdar refwert)))
ele3d (handent ref)
)
(if (/= ele3d nil)
(progn
;Attribut mit Positionsnummer des 3D-Blocks
(setq ele3dpos (entnext ele3d))
(if (= (cdr (assoc 2 (entget ele3dpos))) "EAIT3D_POSITION")
(progn
;Positionsnummer des 3D-Blockes:
(setq posele3d (cdr (assoc 1 (entget ele3dpos)))
eleposnr3d (entnext elepos)
)
(if (= (cdr (assoc 2 (entget eleposnr3d))) "EAIT3D_POS")
(progn
;Positionsnummer der Position:
(setq nrele3d (cdr (assoc 1 (entget eleposnr3d))))
;Abgleich:
(If (/= posele3d nrele3d)
(progn
;alte Positionsnummer:
(setq attpos (assoc 1 (entget eleposnr3d))
;neue Positionsnummer:
attposneu (cons 1 posele3d)
;alte Elementdaten:
atteledata (entget eleposnr3d)
;neue Elementdaten:
atteledataneu (subst attposneu attpos atteledata)
)
(entmod atteledataneu)
(command "_.regen")
) ;progn
) ;if
) ;progn
) ;if
) ;progn
) ;if
) ;progn
) ;if
) ;repeat
) ;progn
) ;if
(princ)
)
;-----------------------------------------------------------------------------
;Hilfs-Funktion zur Anzeige aller Attributwerte eines Blockes
(defun c:EAIT_atte ( / ele1 ele1a ele2 ele3 ele4)
(setq ele1 (car (entsel))
ele1a (entget ele1)
ele2 "start"
ele3 ele1
)
(if (/= ele1 nil)
(progn
(if (= (cdr (assoc 66 ele1a)) 1)
(progn
(while (/= ele2 "SEQEND")
(setq ele3 (entnext ele3)
ele2 (cdr (assoc 0 (entget ele3)))
ele4 (cdr (assoc 2 (entget ele3)))
)
(print ele4)
)
)
)
)
)
)
;-----------------------------------------------------------------------------
;Funktion zur Anzeige von Bauteilen referenzierter Positionsnummern
(defun c:EAITzeigbauteil ()
(setvar "OSMODE" 512)
(EAITmsg "mb_mld21" "\n" "014" ":");Positionsnummer waehlen
(setq eppunkt (getpoint)
asatzdaten (ssget eppunkt '((0 . "INSERT") (-3 ("INFO_REFERENZ"))))
)
(setvar "OSMODE" 0)
(if (/= asatzdaten nil)
(progn
(setq
refdata (entget (ssname asatzdaten 0) '("INFO_REFERENZ"))
refwert (cdr (assoc -3 refdata))
ref (cdr (assoc 1005 (cdar refwert)))
info (handent ref)
)
(redraw info 3)
)
)
)
(defun SplitFn ( PfadDatei / len lenpoint ch z)
(setq len (strlen PfadDatei) lenpoint (strlen PfadDatei) z 0)
(while (and
(> len 0)
(/= (setq ch (substr PfadDatei len 1)) "\\")
(/= ch "/")
(/= ch ":")
)
(setq len (1- len))
(if (AND (< z 1)(= ch ".")) (setq lenpoint len z (1+ z)))
)
(cons (substr PfadDatei 1 len) (substr PfadDatei (1+ len) (- lenpoint len)))
);defun
;Programm setzt die von ACAD14 fⁿr CR/LF gesetzten Steuerzeichen um in solche Steuerzeichen,
;die ML3 auch lesen kann. read-line kann die von ACAD14 gesetzten Zeichen richtig interpre-
;tieren und write-line schreibt sie so weg, wie ML3 sie braucht.
(defun EAITreadwrite (datei / of1 of2 zeile)
(setq of1 (open (strcat datei ".txt") "r"))
(setq of2 (open (strcat EAITpfm "EAITrewr.txt") "w"))
(while (setq zeile (read-line of1))
(write-line zeile of2)
)
(close of1)
(close of2)
(command "EAITshell"
(strcat "copy "
(strcat EAITpfm "EAITrewr.txt ")
(strcat datei ".txt")
)
)
)
(princ)